package com.rtrj.resource.logic.service.user.impl;


import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.rtrj.resource.data.dao.user.UserEntityMapper;
import com.rtrj.resource.data.entity.user.UserEntity;
import com.rtrj.resource.logic.service.user.UserService;

@Transactional(rollbackFor={Exception.class})
@Component
public class UserServiceImpl implements UserService {
	
	private static final Logger  logger = LoggerFactory.getLogger(UserServiceImpl.class);
	
	@Resource
	private UserEntityMapper userEntityMapper;
	
	@Override
	public boolean UserLoginService(UserEntity userEntity) throws Exception{
		logger.debug("user login service begin");
		UserEntity user = new UserEntity();
		user.setUserName(userEntity.getUserName());
		user.setPassWord(userEntity.getPassWord());
		user=userEntityMapper.selectLogin(user);
		if(null!=user){
			return true;
		}
		return false;
	}
	
	@Override
	public boolean UserLoginUserNameService(UserEntity userEntity) throws Exception {
		logger.debug("user login userName service begin");
		UserEntity user = new UserEntity();
		user.setUserName(userEntity.getUserName());
		return false;
	}

	@Override
	public boolean UserLoginPassWordService(UserEntity userEntity) throws Exception {
		logger.debug("user login passWord service begin");
		UserEntity user = new UserEntity();
		user.setPassWord(userEntity.getPassWord());
		return false;
	}

	@Override
	public boolean AddMerchantEnterpriseService(UserEntity userEntity) throws Exception {
		return false;
	}

	@Override
	public boolean AddMerchantPersonalService(UserEntity userEntity) throws Exception {
		return false;
	}

	@Override
	public boolean AddPersonalMerchantService(UserEntity userEntity) throws Exception {
		return false;
	}

	@Override
	public boolean AddPersonalService(UserEntity userEntity) throws Exception {
		return false;
	}
}
